package 第一个作业;

class 交通 {
    //声明基本成员
    public int speed=100;
    public String name="路虎";
    public String color="虎皮";
    //方法设置和获得车辆信息
    public void setcolor(String color) {
        this.color=color;
    }
    public void setSpeed(int speed) {
        this.speed = speed;
    }
    public String getColor() {
        return color;
    }
    public String getName() {
        return name;
    }
    public int getSpeed() {
        return speed;
    }
}
